package com.nowcoder.community.repository;

import com.nowcoder.community.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author tang
 * @create 2020-11-01
 */
@Mapper
public interface CommentMapper {
      /**
       *
       * @param entityType
       * @param entityId
       * @param offsite
       * @param limit
       * @return
       */
      List<Comment> selectCommentsByEntity(int entityType,int entityId,int offsite,int limit);

      int selectCountByEntity(int entityType,int entityId);

      int insertComment(Comment comment);

}
